package com.visikard.utility;

import java.io.IOException;

public class VKNetworkException extends IOException{
	
	public static final int CODE_NETWORK_DISABLE = 1;
	public static final int CODE_CONNECTION_TIMEOUT = 2;
	public static final int CODE_BAD_REQUEST = 3;
	public static final int CODE_UNSUPPORTED_ENCODING = 4;
	public static final int CODE_PROTOCOL_ERROR = 5;
	public static final int CODE_UNKNOWN_ERROR = 6;
	
	/**
	 */
	private static final long serialVersionUID = 1909L;

	public static final int NETWORK_TIMEOUT = 1; 
	
	private int _code;
	private String _cachedData;
	
	public VKNetworkException(int code, String message){
		super(message);
		_cachedData = "";
		_code = code;
	}
	
	public int getCode(){
		return _code;
	}
	
	public void setCachedData(String cachedData){
		_cachedData = cachedData;
	}
	
	public String getCachedData(){
		return _cachedData;
	}
}
